function sing(name){
    this.name=name
    this.instance=null
}
sing.prototype.getname=function(){
    console.log(this.name);
}
sing.getinstance=function(name){
    if(!this.instance){
        this.instance=new sing(name)
    }
    return this.instance
}
const a=sing.getinstance('a')
const b=sing.getinstance('b')
console.log(a);
console.log(b);